import { Injectable } from '@nestjs/common';
import { CreateUploadDto } from './dto/create-upload.dto';
import { UpdateUploadDto } from './dto/update-upload.dto';
import type {Response} from 'express'
import { join } from 'path';

@Injectable()
export class UploadService {

  upload(file){
    console.log(file);
    return '上传文件'+ file
  }

  download(res:Response){
    const url = join(__dirname,'../images/1700459592793.jpg')
    res.download(url)
  }
}
